﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="frm_SaleBillSubList.aspx.cs" Inherits="SaleSystem.ComPage.frm_SaleBillSubList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <ext:PageManager runat="server" ID="PageManager1" />    
            <ext:Toolbar runat="server" ID="toolbar1">
            <Items>
                <ext:Button runat="server" ID="bnSearch" Text="查询" Icon="Reload" Type="Submit" OnClick="bnSearch_Click">
                </ext:Button>
                <ext:Button runat="server" ID="bnClose" Text="关闭" Icon="SystemClose">
                </ext:Button>
            </Items>
        </ext:Toolbar>
     <ext:Form runat="server" ID="Form2" EnableBackgroundColor="true" ShowHeader="false" AutoScroll="true"
            BodyPadding="10px" ShowBorder="false">
            <Rows>
                <ext:FormRow>
                    <Items>
                        <ext:TextBox runat="server" ID="tb_SBill_Code" Label="销售单号" Width="200px" TabIndex="1">
                        </ext:TextBox>
                        <ext:TextBox runat="server" ID="tb_SBill_Code2" Label="出库单号" Width="200px" TabIndex="2">
                        </ext:TextBox>
                    </Items>
                </ext:FormRow>
                <ext:FormRow>
                    <Items>
                        <ext:DropDownList runat="server" ID="ddl_SBill_Type" Label="销售单类型" Width="200px" DataValueField="BData_Id" TabIndex="3"
                            DataTextField="BData_Name">
                        </ext:DropDownList>  
                         <ext:TextBox runat="server" ID="tb_SBill_Cust_Id" Label="客户名称" Width="200px" TabIndex="2">
                        </ext:TextBox>
                    </Items>
                </ext:FormRow> 
                <ext:FormRow>
                    <Items>
                          <ext:TextBox runat="server" ID="tb_PInfo_Name" Label="产品名称" Width="200px" TabIndex="2">
                        </ext:TextBox>
                         <ext:TextBox runat="server" ID="tb_PInfo_CH" Label="串号" Width="200px" TabIndex="2">
                        </ext:TextBox>
                    </Items>
                </ext:FormRow>
                <ext:FormRow>
                    <Items>
                        <ext:DropDownList runat="server" ID="ddl_SBill_User" Label="经办人" Width="200px" DataValueField="SUser_Id" TabIndex="11"
                            DataTextField="SUser_Name">
                        </ext:DropDownList>
                    </Items>
                </ext:FormRow>
            </Rows>
        </ext:Form>
    <ext:Grid runat="server" ID="gv_List" EnableBackgroundColor="true" Title="列表"   IsDatabasePaging="true" DataKeyNames="Id,Code" EnableRowNumber="true"  AllowPaging="true" OnPageIndexChange="gv_List_PageIndexChange"  AutoHeight="true" ShowHeader="false" BodyPadding="5px" ShowBorder="false" OnRowCommand="gv_List_RowCommand">
    <Columns>
        <ext:LinkButtonField ColumnID="OK" CommandName="OK" Text="确定" HeaderText="确定" Width="50px" /> 
        <ext:LinkButtonField ColumnID="edit" CommandName="edit"  Text="编辑" HeaderText="编辑" Width="50px" />    
        <ext:BoundField ColumnID="Code" DataField="Code" DataTooltipField="Code" HeaderText="销售单号" Width="100px" />
        <ext:BoundField ColumnID="SBill_Code2" DataField="SBill_Code2" DataTooltipField="SBill_Code2" HeaderText="出库单号" Width="100px" />
        
        <ext:BoundField ColumnID="CustName" DataField="CustName" DataTooltipField="CustName" HeaderText="客户名称"   Width="100px"/> 
        <ext:TemplateField HeaderText="销售日期" Width="80px">
                <ItemTemplate>                
                    <%# DateTime.Parse(DataBinder.Eval(Container.DataItem, "SBill_Date").ToString()).ToString("yyyy-MM-dd")%>
                </ItemTemplate>
            </ext:TemplateField> 
        <ext:BoundField ColumnID="PInfo_Name" DataField="PInfo_Name" DataTooltipField="PInfo_Name" HeaderText="产品名称"   Width="100px"/>       
        <ext:BoundField ColumnID="PInfo_CH" DataField="PInfo_CH" DataTooltipField="PInfo_CH" HeaderText="串号"   Width="100px"/>    
        <ext:CheckBoxField ColumnID="SBill_State" DataField="SBill_State" DataTooltipField="SBill_State" HeaderText="结算" Width="50px"/> 
    </Columns>
    </ext:Grid>
   <ext:Window runat="server" ID="win_Content2" Popup="false" EnableIFrame="true" EnableConfirmOnClose="true" EnableMaximize="false"
        Title="新增销售单" IFrameUrl="about:blank" Target="Top" IsModal="true" Width="800px"
        Height="600px" ></ext:Window>
    </div>
    </form>
</body>
</html>
